package xyz.hujf.tool.并发包原理解析;

import java.util.concurrent.locks.LockSupport;

/**
 * @author Hujf
 * @title: TestPark
 * @date 2021-04-29 19:47
 * @description: TODO
 */
public class TestPark {

    public static void main(String[] args) {
        System.out.println("123");

        long start =System.currentTimeMillis();
        LockSupport.parkNanos(1000 * 1000 * 1000 * 5L);
       // LockSupport.park();
        long end =System.currentTimeMillis();
        System.out.println(end - start);
        System.out.println("阻塞5S后自动恢复");
    }
}
